1. Field of the Invention
The present invention relates to an information processing apparatus, a print control method, and a storage medium, and more particularly to an information processing apparatus used in a system including an information processing apparatus, such as a personal computer, and a printing apparatus, such as a printer, a print control method executed by the image processing apparatus, and a storage medium storing a program for implementing the print control method.
2. Description of the Related Art
An information processing apparatus, such as a personal computer, is equipped with an operating system (OS) implemented by software for providing basic functions including input/output functions, such as keyboard input and image output, which are commonly utilized by many kinds of application software (hereinafter simply referred to as “applications”), and managing the overall operation of the information processing apparatus. Examples of the operating system include Microsoft Windows (registered trademark) XP, Microsoft Windows (registered trademark) 2000, and Microsoft Windows (registered trademark) Vista.
There are various document file formats which enable the user to browse various kinds of documents using such an information processing apparatus. One of them is a document file format called XML Paper Specification (XPS). In Windows (registered trademark) Vista, the XPS is used not only as a document file format, but also as a print spool file format, and further, it can be used as a PDL (Page Description Language) format. Hereafter, data in the XPS format will be referred to as XPS data, and a file containing XPS data as an XPS file.
By the way, in a case where printing is performed in a system including an information processing apparatus and a printing apparatus, such as a printer, when receiving a print execution instruction from a user, an application in the information processing apparatus issues a print command according to an OS on which the application operates and a printing system provided by the OS. For example, an application operating on an OS, such as Windows (registered trademark) XP or 2000, issues a print command according to the form of a printing system called a GDI (Graphics Device Interface) print path provided by the OS.
On the other hand, in Windows (registered trademark) Vista, a printing system called an XPS print path is provided anew in addition to the GDI print path. The GDI print path and the XPS print path will be described in detail hereinafter.
Now, a description will be given of the format of the XPS data.
The XPS data is archive data formed by compressing a plurality of files in the ZIP compression format and archiving the compressed files in one file. Files to be archived include XML (Extensible Markup Language) files, JPEG (Joint Photographic Experts Group) files, PNG (Portable Network Graphics) files, TIFF (Tagged Image File Format) files, HD Photo files, and font files.
In an XML file, various kinds of information items defining the page layout of an XPS document are described in the XML format. It should be noted that the XML file is divided into a plurality of XML files associated with the respective information items to be described. In the case of the XPS, one XPS document is considered to be divided into several bundles. More specifically, the single XPS document is comprised of one document or a plurality of documents, and one document is comprised of one page or a plurality of pages. Each of JPEG, PNG, TIFF, and HD Photo is a format for expressing images. Files in these formats are generically referred to as image files. XPS data includes a number of image files and a number of font files required for forming one XPS document. Each of the files included in the XPS data will be referred to as part data. In short, one XPS data item (data of one XPS document) includes a plurality of part data items. FIG. 4 shows an example of construction of XPS data.
Each part data item included in the XPS data contains a reference tag to another part data item. All the part data items in the XPS data are integrated by the reference tags as related parts into one piece of document information. The XPS data includes not only image files 808 and 809 and a font file 807, but also a plurality of part data items described below by way of example, and the part data items have the following reference tags.
a) _rels/.rels 801: a part data item as a starting point of a document data item (data of one XPS document). This part data item has a reference tag to FixedDocumentSequence (hereinafter abbreviated as “FDS”) referred to hereinafter.
b) FDS 810: a part data item describing layout information on one document data item. This part data item has a reference tag to FixedDocument (hereinafter abbreviated as “FD”) described hereinafter. It should be noted that one document data item can include a plurality of documents. In other words, an FDS can have a plurality of reference tags to respective FDs.
c) FD 804 (806): a part data item describing layout information on a document. This part data item has a reference tag to FixedPage (hereinafter abbreviated as “FP”) referred to hereinafter. It should be noted that one document can include a plurality of pages. In other words, an FD can have a plurality of reference tags to respective FPs.
d) FP 802 (803, 805): a part data item describing one piece of page information. This part data item has reference tags to the image files 808 and 809 and the font file 807, as required. For example, when one page includes an image to be formed thereon, the FD 802 (803, 805) has a reference tag to an image file of the image.
FIG. 5 is a reference diagram of a logical structure of reference relations between part data items of the XPS data in FIG. 4. FIG. 6 is a reference diagram useful in explaining the reference relations between the part data items based on XML file descriptions of the respective part data items.
As shown in FIG. 5, the part data _rels/.rels 801 refers to the part data FDS 810, the FDS 810 refers to the part data items FD 804 and 806, the FD 804 refers to the part data items FP 802 and 803, the FD 806 refers to the FP 805, the FP 802 refers to the image file 808 and the font file 807, the FP 803 refers to the image file 809, and the FP 805 refers to the image file 809.
Next, data compressed in the ZIP compression format (hereinafter expressed as “ZIP-compressed”) forming a component of XPS data will be described with reference to FIG. 7.
FIG. 7 is a reference diagram of an example of data compressed in the ZIP compression format, forming a component of XPS data.
The ZIP-compressed data includes data sections called Local File Header 601 and file data 602, respectively. As shown in FIG. 7, the Local File Header 601 unexceptionally exists immediately before the file data 602, and the pair of the Local File Header 601 and the file data 602 forms information on one file of expanded data. In other words, the ZIP-compressed data can be expanded into one file of the expanded data based on the pair of the Local File Header 601 and the file data 602. The pair of the Local File Header 601 and the file data 602 will be hereinafter referred to as the file data section. When the expanded data includes a plurality of files, the ZIP-compressed data includes plurality of file data sections.
ZIP compression is capable of compressing data while maintaining a directory structure of uncompressed i.e. expanded data. However, even if a file exists in a hierarchically upper layer of the directory structure of the uncompressed i.e. expanded data, a file data section as a component of the file in compressed data is not always positioned in the leading portion of the data. In other words, there is no relationship between a hierarchical position in the directory structure of uncompressed or expanded data and the position of a file data section in the compressed data of the same.
In Windows (registered trademark) Vista, the XPS format can be used not only as a document file format or a print spool file, but also as a PDL format, as mentioned hereinbefore. In a case where the XPS format is used as a PDL format, ZIP-compressed data is transmitted from an information processing apparatus to a printing apparatus via a network, for example. It should be noted that, in general, sent data is not collectively sent to a printing apparatus, but it is divided into several parts and then sent to the printing apparatus. The printing apparatus receives the data and analyzes the received data (XPS data) for printing. It should be noted that in most cases, the printing apparatus is capable of performing data reception and data analysis processing for analyzing already-received XPS data, in parallel.
As one of the functions of Windows (registered trademark) Vista, there exists an application called Microsoft XPS Document Writer (MXDW). This application is used for generating an XPS file. When an XPS file is generated by the MXDW, normally, data in a file data section having information of the part data _rels/.rels, data in a file data section having information of the FDS part data, data in file data sections having information of the respective FD part data items, and data in file data sections having information of the respective FP part data items are arranged in the sequence of FPs 802, 803, 805→FDs 804 and 806→FDS 810→_rels/.rels 801, as shown in FIG. 8. Hereafter, this sequence will be referred to as the data sequence.
In the case of using the XPS as the PDL format, XPS data is divided into several parts and sent to a printing apparatus as described hereinbefore. In this case, the XPS data having the file data sections arranged in the data sequence is sent to the printing apparatus by transmitting all the file data sections having information of the respective FP, FD, and FDS part data items after the start of the transmission, and then transmitting the file data section having information of the part data _rels/.rels. The part data _rels/.rels is the starting point of the XPS document as described hereinbefore, and hence the printing apparatus cannot start XPS data analysis until the file data section having information on the part data _rels/.rels is received. This makes it impossible for the printing apparatus to perform XPS data reception and XPS data analysis in parallel, which lowers print throughput as a whole.
Further, even if the file data section having information of the part data _rels/.rels is disposed in the leading portion of the XPS data, when the data sequence is set such that the file data section having information of the FDS part data to be referred to next is disposed e.g. in the trailing end of the XPS data, the printing apparatus has to suspend the XPS data analysis until the file data section having information of the FDS part data is received, which also lowers print throughput as a whole.
By the way, the XPS includes a specification called interleave, based on which a part data item is divided into a plurality of part data items.
XPS data conforming to this specification will be referred to as “interleaved data”, and to convert general XPS data into data conforming to the interleave specification will be expressed as “to interleave”. For example, the XPS data shown in FIG. 6 can be interleaved into interleaved data shown in FIG. 9. In the interleaved data in FIG. 9, each part data item is divided where a reference tag to next part data exists. FIG. 10 shows an example of construction of interleaved XPS data.
In the XPS data shown in FIG. 10, the part data _rels/.rels is divided into two part data items 851 and 852, the FDS part data is divided into three part data items 858, 859, and 860, and a first FD part data item is divided into three part data items 853, 854, and 855, and second FD part data into two part data items 856 and 857.
By rearranging the part data items divided as shown in FIG. 9 in a data sequence in which each reference destination data item is disposed immediately after an associated reference tag as shown in FIG. 11, it is possible to solve the problem of lowered print throughput. This is because the printing apparatus sequentially receives file data sections having information of respective part data items to be analyzed, in order, and therefore each of the file data sections can be analyzed immediately after reception of the same.
For example, in FIG. 11, first, a file data section having information on the first part data item 851 of the _rels/.rels part data items 851, 852 divided in two is received. At this time point, the printing apparatus is first required to analyze the part data item. This reception of the file data section having the information of the first part data item 851 enables the printing apparatus to immediately start analysis of the part data required to be analyzed first. Then, a file data section having information of the first part data item 858 of the FDS part data divided into three is received. This reception of the file data section having the information on the first part data item 858 enables the printing apparatus to immediately start analysis of the part data required to be analyzed at this time point.
Then, a file data section having information of the first part data item 853, which describes layout information on a first document, of the FD part data divided into three is received. This reception of the file data section having the information on the first part data item 853 enables the printing apparatus to immediately start analysis of the part data required to be analyzed at this time point.
Then, a file data section having information on the FP part data item 861 describing page information on a first page of the first document is received. This reception of the file data section having the information on the FP part data item 861 enables the printing apparatus to immediately start analysis of the part data required to be analyzed at this time point. This makes it possible to print the first page of the first document.
Then, a file data section having information on the second part data item 854, which describes layout information on the first document, of the FD part data divided into three is received. This reception of the file data section having the information on the second part data item 854 enables the printing apparatus to immediately start analysis of the part data required to be analyzed at this time point.
Then, a file data section having information of an FP part data item 862 describing page information on a second page of the first document is received. This reception of the file data section having the information on the FP part data item 862 enables the printing apparatus to immediately start analysis of the part data required to be analyzed at this time point. This makes it possible to print the second page of the first document. As described above, the part data items can each be analyzed immediately after reception of the associated file data section, which makes it possible to solve the problem of lowered print throughput.
It should be noted that in Windows (registered trademark) Vista, the XPS can be used not only as a document file format, but also as a print spool file format. In general, in a case where the XPS print path is used, a printing system provided by the OS automatically generates a print spool file in the XPS file format. XPS data generated at this time has a data sequence shown in FIG. 11, for example.
However, there also exists a technique in which other XPS data than XPS data generated by a printing system provided by an OS when the above-mentioned XPS print path is used is directly output as a print spool file, and when this technique is employed, XPS data does not always have the data sequence shown in FIG. 11.
In the above-described conventional printing method, a print spool file generated in the XPS file format by the printing system provided by the OS when the XPS print path is used has a data sequence which makes it possible to solve the problem of lowered print throughput, when normal-order printing is performed.
However, in the case of reverse-order printing or bookbinding printing, the problem of lowered print throughput cannot be solved by the data sequence of XPS data generated by the printing system. For example, in normal-order printing based on the XPS data shown in FIG. 11, a printing apparatus is required to carry out printing in the order of the first page of the first document, the second page of the first document, a third page of the first document, a first page of a second document, and a second page of the second document.
On the other hand, in reverse-order printing, the printing apparatus is required to carry out printing in the order of the second page of the second document, the first page of the second document, the third page of the first document, the second page of the first document, and the first page of the first document. For this reason, after having received and analyzed the file data section having the information of the first part data item of the _rels/.rels part data items divided in two, the printing apparatus has to suspend XPS data analysis until the file data section having the information on the second part data item of the FDS part data divided into three is received.
In short, since the XPS data generated by the printing system does not have a data sequence suitable for data analysis in reverse-order printing, suspension of XPS data analysis inevitably occurs, which results in lowered print throughput. Similarly, since the XPS data generated by the printing system does not have a data sequence suitable for data analysis in bookbinding printing, the suspension of XPS data analysis inevitably occurs, which results in lowered print throughput.